package com.neu.controller;

import com.neu.service.BannerService;
import com.neu.utils.ResultModel;
import com.neu.vo.BannerVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/banner")
public class BannerController {
    @Autowired
    BannerService bannerService;
    @GetMapping("/getInfo")
    public ResultModel<List<BannerVO>> findAllBanner(){
        ResultModel resultModel=new ResultModel();
        List<BannerVO> bannerVOList=bannerService.findAllBanner();
        resultModel.setData(bannerVOList);
        resultModel.setMsg("查询成功");
        return  resultModel;
    }
}
